home *** CD-ROM | disk | FTP | other *** search
- Path: mail2news.demon.co.uk!genesis.demon.co.uk
- From: Lawrence Kirby <fred@genesis.demon.co.uk>
- Newsgroups: comp.lang.c
- Subject: Re: GoTo equivalent in C ??
- Date: Wed, 17 Jan 96 17:36:32 GMT
- Organization: none
- Message-ID: <821900192snz@genesis.demon.co.uk>
- References: <4d67vm$e5h@masala.cc.uh.edu> <4d8sa6$mqc@news.iag.net> <4de4ae$h6a@masala.cc.uh.edu>
- Reply-To: fred@genesis.demon.co.uk
- X-NNTP-Posting-Host: genesis.demon.co.uk
- X-Newsreader: Demon Internet Simple News v1.27
- X-Mail2News-Path: genesis.demon.co.uk
-
- In article <4de4ae$h6a@masala.cc.uh.edu> sukku@menudo.uh.edu "sukumar" writes:
-
- >What does everyone do?? I have always been tempted to use goto especially in
- >functions involving a lot of computation and error checking.
- >I have heard people say "People who don't know how to code use GOTO". I was
- >curious to know how guys that say this solve the above problem.
-
- Novice programmers use goto indiscriminately because they don't know
- any better (that's fair enough, it might not strictly be true now since
- modern languages don't need goto to be introduced until much later on).
-
- Intermediate programmers know that goto is a 'bad thing' and simply don't
- use them. Its probably an embarrassment being caught using a goto!
-
- More experienced programmers recognise that you use the best tool for the
- job and that can sometimes (although rarely) be goto. If by avoiding goto
- you make the code more complex and less readable you've made a bad decision.
-
- --
- -----------------------------------------
- Lawrence Kirby | fred@genesis.demon.co.uk
- Wilts, England | 70734.126@compuserve.com
- -----------------------------------------
-